﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace _010_011_012操作符详解_2_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // Calculator c = new Calculator();
            // Action MyAction = new Action(c.PrintHello); // 正确：使用 Action（非泛型）
            //MyAction(); // 输出: Hello World

            int[] array = new int[10];//初始化数组 不赋值默认为0 
            int[] newArray = new int[] { 1, 2, 3, 4, 5, 6 };
            for (int i = 0; i < array.Length; i++) {
                Console.WriteLine(array[i]);
            }
            Console.WriteLine(newArray[1]);
           
        }
    }

    class Calculator
    {
        public int Add(int x, int y)
        {
            return x + y;
        }

        public void PrintHello()
        {
            Console.WriteLine("Hello World");
        }
    }
}